/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 充值配置 GET /api/recharge/config */
export async function configUsingGet1({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/recharge/config', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 充值记录 GET /api/recharge/lists */
export async function listsUsingGet2({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.listsUsingGET2Params;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/recharge/lists', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 充值下单 POST /api/recharge/recharge */
export async function rechargeUsingPost({
  body,
  options,
}: {
  body: API.xinyonghugengxinxinxicanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/recharge/recharge', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
